(dired-undo): Call `dired-build-subdir-alist'.
authorLuc Teirlinck <teirllm@auburn.edu>
Mon, 7 Jun 2004 18:25:46 +0000 (18:25 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Mon, 7 Jun 2004 18:25:46 +0000 (18:25 +0000)
Limit scope of `buffer-read-only' binding.

lisp/dired.el

index 589e1fa048976f109d0ec1803c39efe1a271d13e..acf5174170fdbef9a79ac5980484b6cb7a59ec81 100644 (file)
@@ -1448,14 +1448,13 @@ Keybindings:
 (defun dired-undo ()
   "Undo in a dired buffer.
 This doesn't recover lost files, it just undoes changes in the buffer itself.
-You can use it to recover marks, killed lines or subdirs.
-In the latter case, you have to do \\[dired-build-subdir-alist] to
-parse the buffer again."
+You can use it to recover marks, killed lines or subdirs."
   (interactive)
   (let (buffer-read-only)
-    (undo)
-    (message "Change in Dired buffer undone.
-Actual changes in files cannot be undone by Emacs.")))
+    (undo))
+  (dired-build-subdir-alist)
+  (message "Change in Dired buffer undone.
+Actual changes in files cannot be undone by Emacs."))
 
 (defun dired-next-line (arg)
   "Move down lines then position at filename.